BEST-COST GitHub repository

Let’s start by checking out the BEST-COST GitHub repo and the README file

Landing page of the BEST-COST GitHub repo. The README file tells you how to get started. The folder r_package contains package-related files (including function code). Developments are discussed and documented under Issues.

Landing page of the BEST-COST GitHub repo. The README file tells you how to get started. The folder r_package contains package-related files (including function code). Developments are discussed and documented under Issues.

healthiar in RStudio

Post installation, you can access the healthiar package landing page in RStudio by going to the Packages tab and then clicking on the healthiar package.

Landing page of the healthiar package in RStudio, where you find the package vignettes and function documentation.

Simple calculation

Attribute COPD cases to air pollution

#|# output-location: slide # Puts output on the next slide

results_pm_copd <-
  healthiar::attribute_health(
    erf_shape = "log_linear",
    rr_central = exdat_pm_copd$relative_risk, 
    rr_lower = exdat_pm_copd$relative_risk_lower,
    rr_upper = exdat_pm_copd$relative_risk_upper,
    rr_increment = 10, 
    exp_central = exdat_pm_copd$mean_concentration,
    cutoff_central = exdat_pm_copd$cut_off_value,
    bhd_central = exdat_pm_copd$incidents_per_100_000_per_year/1E5*
      exdat_pm_copd$population_at_risk
  ) 

Let’s check the main output!

This is what the health_main output table looks like

results_pm_copd |> 
  pluck("health_main") |>
  select(exp, bhd, rr, erf_ci, pop_fraction, impact_rounded) |> 
  knitr::kable() # Prints tibble in a minimal layout
exp bhd rr erf_ci pop_fraction impact_rounded
8.85 30747 1.369 central 0.1138961 3502
8.85 30747 1.124 lower 0.0440064 1353
8.85 30747 1.664 upper 0.1780300 5474

Let’s check the detailed output!

results_pm_copd[["health_detailed"]][["raw"]] |> knitr::kable()
geo_id_disaggregated erf_ci exp_ci bhd_ci cutoff_ci pop_fraction impact prop_pop_exp rr_increment erf_shape exposure_name approach_risk health_outcome exposure_dimension exposure_type exp rr bhd cutoff pop_fraction_type rr_conc impact_rounded
1 central central central central 0.1138961 3501.962 1 10 log_linear NA relative_risk same_input_output 1 population_weighted_mean 8.85 1.369 30747 5 paf 1.128536 3502
1 lower central central central 0.0440064 1353.066 1 10 log_linear NA relative_risk same_input_output 1 population_weighted_mean 8.85 1.124 30747 5 paf 1.046032 1353
1 upper central central central 0.1780300 5473.888 1 10 log_linear NA relative_risk same_input_output 1 population_weighted_mean 8.85 1.664 30747 5 paf 1.216589 5474

New slide

results_pm_copd |> 
  purrr::pluck("health_detailed") |>
  purrr::pluck("raw") |> 
  dplyr::select(contains("_ci"), impact_rounded) |> 
  knitr::kable() # Prints tibble in a minimal layout
erf_ci exp_ci bhd_ci cutoff_ci impact_rounded
central central central central 3502
lower central central central 1353
upper central central central 5474